
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>服装的单件展示</title>
    <script src="../js/jquery-3.2.1.min.js"></script>
    <script src="../js/fangdaojing/fangdajiu.js"></script>
    <link href="../css/fangdajing/fangdajing.css" rel="stylesheet">

    <script src="../js/fangdaojing/jquery-ui-1.12.1/jquery-ui.js"></script>
<script>
    $(function () {
        $('input[type=submit]').click(function () {
            var id =$('input[name=id]').val();
            var name =$('input[name=name]').val();
            var price =$('input[name=price]').val();
            $.ajax({
                type:'POST',
                url:'../../shoping.do',
                data:{action:'add',id:id,name:name,price: price},
                dataType:'text',
                cache:'false',
                async:'true',
                success:function (d) {
                    alert(d);
                }
            })
        })

    })
</script>

</head>
<body>
<%
    String img=request.getParameter("img");
    String price=request.getParameter("price");
    String name =request.getParameter("name");
    String id =request.getParameter("id");
%>
<div id="main_middle_left">
    <div class="preview">
        <div id="vertical" class="bigImg">
            <img src="../upload/fuzhuang/mid/<%=img%>" width="400" height="400" alt="name" id="midimg" />
            <div style="display:none;" id="winSelector"></div>
        </div><!--bigImg end-->

        <div class="smallImg">
            <div class="scrollbutton smallImgUp disabled"></div>
            <div id="imageMenu">
                <ul>
                    <%--<c:forEach items="${imgs}" var="ii">--%>
                        <li><img src="../upload/fuzhuang/small/<%=img%>"></li>
                   <%-- </c:forEach>--%>
                </ul>
            </div>
            <div class="scrollbutton smallImgDown"></div>
        </div><!--smallImg end-->

        <div id="bigView" style="display:none;"><img width="800" height="800" alt="" src="" /></div>
    </div>

</div>
<br>
<hr>
<hr>
<input type="text" name="id" value="<%=id%>" hidden>
<h1 style="margin-left: 200px ;font-size: 25px" >商品名称：<input type="text" name="name" value="<%=name%>">&nbsp;&nbsp;</h1><br>
<h1 style="margin-left: 200px  ;font-size: 25px">单价：<input type="text" name="price" value="<%=price%>"></h1><br>
<h1 style="font-size: 20px ;margin-left: 200px "><input type="submit" value="添加到购物车" ></h1><br>
<h1 style="font-size: 20px ;margin-left: 200px "><a href="bay_shoping.jsp">查看购物车</a></h1><br>
<h1 style="font-size: 20px ;margin-left: 200px "><a href="bay_clear.jsp">清空购物车</a></h1><br>
<h1 style="font-size: 20px ;margin-left: 200px "><a href="bay_over.jsp">去付款</a></h1><br>

</body>
</html>
